<template>
  <div>
    <videoUpload @uploadFinished="uploadFinished" :formItem="compConfig" @removeFinished="removeFinished"
      :formNamePath="props.formNamePath"></videoUpload>
  </div>
</template>

<script lang="ts" setup>
import { ref, nextTick, computed } from "vue";
import videoUpload from "../../formitem/videoUpload/index.vue";
import formItemForm from "./config";
import { useModelStore } from "@/store/modules/model/column";
import { useColumnModel } from '@/components/draggable/hooks/useColumnModel';
// import { nextTick } from "process";
const useModel = useModelStore();
const formItem = ref(formItemForm as any);
const props = defineProps({
  element: [],
  formNamePath: [],
})
const compConfig = ref(JSON.parse(JSON.stringify(formItemForm.component.settings)));
useColumnModel(compConfig, computed(() => props.element));

const uploadFinished = (data: [], id: any) => {
  compConfig.value.value = data;
};
const removeFinished = (data: any) => {
  compConfig.value.value = [];
}
</script>

<style lang="less" scoped></style>
